package com.example.neuronview
import glm_.glm
import glm_.vec4.Vec4

enum class Type{
    Vertex,
    Normal,
    Indices,
    UV,
    Color,
    Other
}
enum class PrimitiveType{
    POINTS,
    TRIANGLES,
    LINES
}
open class PropertyTypeDef{

}
class PropertyType<T>: PropertyTypeDef(){
    var mData: MutableList<T> = mutableListOf()
    var mSize=0
    fun size():Int{
        return mSize
    }
    fun addItem(item:T){
        mData.add(item)
        mSize = mData.size
    }
}
class Vertex{

    var mProperties : MutableMap<Type, PropertyTypeDef> = mutableMapOf()

    fun addProperties(type:Type,property: PropertyTypeDef){
        mProperties[type] = property
    }
    fun getProperty(type: Type): PropertyTypeDef? {
        return mProperties[type]
    }

}
class Geometry: Node() {
    fun setVertex(vertex: Vertex){
        mVertex = vertex
    }
    fun getVertex():Vertex{
        return mVertex
    }
    var mVertex: Vertex= Vertex()
    var mIndex: PropertyType<Int> = PropertyType<Int>()
    var mPrimitiveType: PrimitiveType= PrimitiveType.LINES
    var m_VAO: Int =0
    var m_VBO: Int =0
    var m_Color: Vec4 = Vec4(0)
}